﻿namespace Community.CsharpSqlite.Entity
{
    public class VdbeOp
    {
        public byte opcode; /* What operation to perform */
        public int p4type; /* One of the P4_xxx constants for p4 */
        public byte opflags; /* Mask of the OPFLG_* flags in opcodes.h */
        public byte p5; /* Fifth parameter is an unsigned character */
#if DEBUG_CLASS_VDBEOP || DEBUG_CLASS_ALL
public int _p1;              /* First operand */
public int p1
{
get { return _p1; }
set { _p1 = value; }
}

public int _p2;              /* Second parameter (often the jump destination) */
public int p2
{
get { return _p2; }
set { _p2 = value; }
}

public int _p3;              /* The third parameter */
public int p3
{
get { return _p3; }
set { _p3 = value; }
}
#else
        public int p1; /* First operand */
        public int p2; /* Second parameter (often the jump destination) */
        public int p3; /* The third parameter */
#endif
        public union_p4 p4 = new union_p4();
#if SQLITE_DEBUG || DEBUG
        public string zComment; /* Comment to improve readability */
#endif
#if VDBE_PROFILE
public int cnt;             /* Number of times this instruction was executed */
public ulong cycles;         /* Total time spend executing this instruction */
#endif
    };
}